home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-06-15 | 1.4 KB | 53 lines | [TEXT/MMCC] |
- // ===========================================================================
- // SCModelProperty.h -- a model property that automatically handles undo
- //
- // ===========================================================================
- // © 1994 James Kaput, SimCalc Project
-
- #pragma once
-
- class SCModelProperty : public LModelProperty {
-
- public:
- SCModelProperty(DescType inPropertyID,
- LModelObject *inSuperModel);
- ~SCModelProperty();
-
- protected:
- //override
- virtual void HandleSetData(const AppleEvent &inAppleEvent,
- AppleEvent &outAEReply);
- };
-
- struct SPropDesc {
- DescType id;
- Str63 name;
- };
-
- #define ALIGN_WORD if (stream.GetMarker() & 0x01) stream.SetMarker(1, streamFrom_Marker);
-
-
- class SCSetPropertyAction : public LAction {
- public:
- SCSetPropertyAction(LModelObject *inObject,
- DescType inPropID,
- const AppleEvent &inAE);
- virtual ~SCSetPropertyAction();
-
- virtual void RedoSelf();
- virtual void UndoSelf();
- virtual void GetDescriptor(Str63 outDescription);
-
- // utilities for describing a property based on the 'aete'
- static void InitPropDescriptors();
- static Boolean DescribeProperty(DescType inPropID, Str63 outDescriptor);
-
- private:
- LModelObject *mObject;
- StAEDescriptor mNewData,
- mOldData;
- DescType mPropID;
-
- static LDynamicArray *sPropDescArray; // descriptors of properties
-
- };